<html> 
<head>
<title>Right clicking on the button should not crash.</title> 
</head> 
<body>
<span style="font-family: Tahoma, Arial; font-size: 13px;">
<button type="button" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-style: initial; border-color: initial; padding-top: 0.2em; padding-right: 0.2em; padding-bottom: 0.2em; padding-left: 0.2em; line-height: normal; font: inherit; color: inherit; white-space: nowrap; background-repeat: repeat-x; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(222, 222, 222); border-right-color: rgb(222, 222, 222); border-bottom-color: rgb(222, 222, 222); border-left-color: rgb(222, 222, 222); cursor: pointer; vertical-align: middle; text-align: center; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 255); -webkit-user-select: none; background-position: 0% 0%; ">
    <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; line-height: normal; font: inherit; color: inherit; display: inline-block; border-style: initial; border-color: initial; vertical-align: middle; "></div>
    <div id="test" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0.3em; padding-bottom: 0px; padding-left: 0.3em; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; line-height: normal; font: inherit; color: inherit; display: inline-block; border-style: initial; border-color: initial; vertical-align: middle; ">Color</div>
</button>
<div>Footer</div>
</span>

</body>
<script>
if (window.testRunner) {   
    testRunner.dumpAsText();
    var elem = document.getElementById("test");
    x = elem.offsetLeft + elem.offsetWidth / 2;
    y = elem.offsetTop + elem.offsetHeight / 2;
    eventSender.mouseMoveTo(x, y);
    eventSender.contextClick();
}
</script>
</html>
